package types

import (
	"io"
	"log"
	"os"
)

var (
	openLog   *log.Logger
	statusLog *log.Logger
	logfile   *os.File
)

func init() {
	var err error
	logfile, err = os.OpenFile("locker-control.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
	if err != nil {
		log.Fatal(err)
	}
	log.SetOutput(io.MultiWriter(os.Stdout, logfile))
	openLog = log.New(io.MultiWriter(os.Stdout, logfile), "LockerOpen() ", log.LstdFlags)
	statusLog = log.New(io.MultiWriter(os.Stdout, logfile), "LockerStatus() ", log.LstdFlags)
}
